# Makefile generique.
# Nom du programme
PRG= external
 
# Fichiers ML du programme
ML= external.ml
MLI=
  
# Les listes de fichiers à produire
CMO=${ML:.ml=.cmo}
CMX=${ML:.ml=.cmx}
CMI=${MLI:.mli=.cmi}
	 

OCAMLOPT=ocamlopt.opt unix.cmxa
OCAMLC=ocamlc.opt
OCAMLDEP=ocamldep

${PRG}: ${CMX}
	${OCAMLOPT} -o $@ ${CMX}
	
${PRG}.byte: ${CMO}
	${OCAMLC} -o ${CMO}
  	 	 
.SUFFIXES: .ml .mli .cmo .cmx .cmi
  	 	  
.ml.cmx:
	${OCAMLOPT} -c $<
 	 	  	 
.ml.cmo:
	${OCAMLC} -c $<
  	 	  	 	 
.mli.cmi:
	${OCAMLC} -c $<
  	 	  	 	 	 
clean::
	rm -f *.cm? *.o *~
	rm -f ${PRG} ${PRG}.byte

fullclean:: clean
	rm -f .depend

depend: .depend

.depend: ${ML} ${MLI}
	rm -f .depend
	${OCAMLDEP} ${ML} ${MLI} > .depend

include .depend

